import {mDownInstructionBook} from '@/api/others'
import {ContentView, ContentViewNoFooter} from '@/components/main/contentView'
import {ViewLeft} from '@/components/main/viewLeft'
import useGlobalAPI from '@/hooks/useGlobalAPI'
import {
  TypeTable,
  TypeMainViewNav,
  TypeModel,
  ViewLeftNav,
  ViewLeftFilter,
  ViewLeftFooter,
  getProFileType,
} from './components'

export default defineComponent({
  name: 'otehrs-productFileList',
  setup() {
    let {route} = useGlobalAPI()
    onMounted(async () => {
      getProFileType()
      mDownInstructionBook({fileName: '32孔智能消解仪(中文)'})
    })
    return () => (
      <div class="h-full flex">
        <ViewLeft>
          {{
            nav: () => <ViewLeftNav></ViewLeftNav>,
            content: () => <ViewLeftFilter></ViewLeftFilter>,
            footer: () => <ViewLeftFooter></ViewLeftFooter>,
          }}
        </ViewLeft>
        <ContentViewNoFooter>
          {{
            nav: () => <TypeMainViewNav></TypeMainViewNav>,
            content: () => <TypeTable></TypeTable>,
          }}
        </ContentViewNoFooter>
        <TypeModel></TypeModel>
      </div>
    )
  },
})
